<jsp:useBean id="sessiondata" class="bibbletex.models.SessionData"
	scope="session" />

<%@ page
	import="bibbletex.models.Collaboration,bibbletex.models.Reference,bibbletex.models.SessionData,java.util.List"%>

<%
	String page_title = new String("References for Collaboration "
			+ sessiondata.getCollaboration().getTitle());
	boolean show_title = true;
%>
<%@ include file="/header.jsp"%>

<%
	Collaboration c = sessiondata.getCollaboration();
%>

<h2>Collaboration</h2>
<p>
	UUID:
	<%=c.getId()%>
</p>

<p>
	Title:
	<%=c.getTitle()%>
</p>

<p>
	Description:
	<%=c.getDescription()%>
</p>

<h2>References</h2>
<div class="referenceNavigation">
  <a href="" class="current">Library</a>
  <a href="">Suggestions</a> 
</div>
<table id="referenceContainer">
   <tr class="containerHead">
       <!-- <td>ID</td> -->
        <td>Type</td>
        <td>Title</td>
        <td>Authors</td>
        <td></td>
        <td></td> 
   </tr>
<%
	List<Reference> refs = c.getReferences();
	for (Reference r : refs) {
%>
<tr class="containerBody">
	<!-- <td><%=r.getId()%></td> -->
	<td><%=r.getType()%></td>
	<td><%=r.getTitle()%></td>
	<td><%=r.getAuthors()%></td>
    <td class="edit"><a href="" title="Edit Reference"></a></td>
    <td class="delete"><a href="" title="Delete Reference"></a></td>
</tr>

<%
	}
%>
</table>

<div class="buttonWrapper">
	<a class="button" href="new.jsp">Add a reference</a>
</div>

<%@ include file="/footer.jsp"%>
